package 多线程.FileSearch;

import java.io.File;
import java.util.Date;

public class Main {
    public static void main(String[] args) {

        File file = new File("C:\\Windows\\");  //目录
        String regex = "hosts"; //文件名
        Date start, end;

        Result result = new Result();

        start = new Date();
        SeriaFileSearch.searchFiles(file, regex, result);
        end = new Date();
        System.out.printf("单线程：Execution Time: %d%n", end.getTime()-start.getTime());


//        start = new Date();
//        ParallelGroupSearch.searchFiles(file, regex, result);
//        end = new Date();
//        System.out.printf("并行搜索的路径：Path：%s%n", parallelResult.getPath());
//        System.out.printf("多线程执行时间: %d%n", end.getTime()-start.getTime());
    }
}
